package 力扣日常刷题.木23一月.第11天311;

import 力扣日常刷题.TreeNode;

/**
 * @author 帅小伙
 * @date 2022/3/11
 * @description
 */
public class Demo43二叉树镜像 {

    public TreeNode mirrorTree(TreeNode root) {
        if(root == null) return root;
        TreeNode r = mirrorTree(root.right);
        TreeNode l = mirrorTree(root.left);
        root.left = r;
        root.right = l;
        return root;
    }

}
